﻿using System;
using ARD.Configuration;

namespace SharpObjects.SearchEngine.Common
{
    [Serializable]
    public class IndexDirectoryDescriptor : IConfigurationObject
    {
        public const string Assembly = "SharpObjects.SearchEngine.Common.dll";
        public const string Class = "SharpObjects.SearchEngine.Common.IndexDirectoryDescriptor";

        public const string DefaultIndexDirectoryId = "main_index";

        public string Path { get; set; }



        #region IConfigurationObject Members

        public string Id { get; set; }

        public void Initialize(System.Xml.XmlElement initialization_section)
        {
            XmlConfig init = new XmlConfig(initialization_section);
            this.Id = init.GetString("@id", string.Empty);
            this.Path = initialization_section.InnerText;
        }

        #endregion
    }
}
